Skip to content

Address user-reported secret leak, RPC proxy retry, and watchdog container issues - #27

Open
stephenctw wants to merge 3 commits into
mainfrom
fix/user-bug-reports-2026-07
Open

Address user-reported secret leak, RPC proxy retry, and watchdog container issues#27
stephenctw wants to merge 3 commits into
mainfrom
fix/user-bug-reports-2026-07

Conversation

@stephenctw

Copy link
Copy Markdown
Collaborator
  • Hide secrets in --help, add -32012 retry code, fix watchdog LUA_CPATH

  • Add hide_env_values = true to all private-key and key-file CLI args (KeyArgs + OptionalKeyArgs) so --help prints the env var name but never the value. Also hide BLOCKCHAIN_HTTP_ENDPOINT (may contain API tokens in the URL). Closes F1 from the security audit.

  • Add -32012 to DEFAULT_LONG_BLOCK_RANGE_ERROR_CODES in the sequencer (Rust) and watchdog (Lua), plus the shared test fixture. This code is returned by JSON-RPC proxies when getLogs exceeds max allowed range; the partition retry now bisects on it automatically.

  • Fix watchdog entrypoint (sequencer-watchdog): append the cartesi deb Lua paths as fallbacks instead of prepending, so the container's /opt/watchdog/lib/lcurl.so is found first.

  • Add regression tests: help output must not leak secret env values, -32012 must be in default codes and trigger retry, fixture scenario for proxy range-exceeded bisect.

…chdog LUA_CPATH

- Add `hide_env_values = true` to all private-key and key-file CLI args
  (KeyArgs + OptionalKeyArgs) so `--help` prints the env var name but
  never the value. Also hide BLOCKCHAIN_HTTP_ENDPOINT (may contain API
  tokens in the URL). Closes F1 from the security audit.

- Add -32012 to DEFAULT_LONG_BLOCK_RANGE_ERROR_CODES in the sequencer
  (Rust) and watchdog (Lua), plus the shared test fixture. This code is
  returned by JSON-RPC proxies when getLogs exceeds max allowed range;
  the partition retry now bisects on it automatically.

- Fix watchdog entrypoint (sequencer-watchdog): append the cartesi deb
  Lua paths as fallbacks instead of prepending, so the container's
  /opt/watchdog/lib/lcurl.so is found first.

- Add regression tests: help output must not leak secret env values,
  -32012 must be in default codes and trigger retry, fixture scenario
  for proxy range-exceeded bisect.
@stephenctw stephenctw self-assigned this Jul 29, 2026
- Document the conscious accept of bare -32012 in the partition default
  list (same overload model as existing -32005; no message heuristics).
- Rewrite help-leak regression as a child-process probe via Command::env
  so parallel cargo test no longer mutates process-global env.
- Join watchdog LUA_{C,}PATH appends with an explicit ';' and derive the
  base from versioned-or-unversioned (Lua 5.4).
- Update README default for LONG_BLOCK_RANGE_ERROR_CODES to include -32012.
The trailing-semicolon trim used `[[ == *' ; ]]` with a broken quote,
so bash treated later `printf '%s;;'` as inside the conditional and
aborted every sequencer-watchdog init with unexpected token `;;`.
Trim via `case` instead and keep the explicit `;` join.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant